<template>
	<view class="content">
		<view class="title">登录</view>
		<view class="login">
			<text class="text">账号密码登录</text>
			<view>
				<image src="../../static/img/buser.png"></image>
				<input v-model="from.username" placeholder="请输入账号" type="text" />
			</view>
			<view>
				<image src="../../static/img/paw.png"></image>
				<input v-model="from.password" placeholder="请输入密码" type="password" />
			</view>
			<text class="forget">忘记密码</text>
			<button @click="login">登录</button>
		</view>
	</view>
</template>

<script>
	import {login} from '../../js/api.js'
	export default {
		data() {
			return {
				from:{
					username:'',
					password:''
				}
			};
		},
		methods:{
			login(){
				login(this.from)
				// uni.navigateTo({
				// 	url:'/pages/index/index'
				// })
			}
		},
		created() {

		}
	};
</script>

<style scoped>
	.content {
		background-image: linear-gradient(#6063DB, #759AF8);
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		
	}

	.title {
		color: #fff;
		font-size: 56rpx;
		letter-spacing: 10px;
		padding: 30px 0;
		font-weight: bold;
	}

	.login {
		display: flex;
		flex-direction: column;
		align-items: center;
		background: #fff;
		width: 690rpx;
		height: 666rpx;
		background: #FFFFFF;
		box-shadow: 0px 5rpx 43rpx 0px rgba(255, 24, 92, 0.18);
		border-radius: 32rpx;
	}

	.forget {
		width: 100%;
		text-align: right;
		margin-top: 32rpx;
		margin-right: 100rpx;
	}

	.login image:nth-of-type(1) {
		width: 37rpx;
		height: 38rpx;
	}

	.login image:nth-of-type(2) {
		width: 37rpx;
		height: 38rpx;
	}

	.login .text {
		font-size: 46rpx;
		letter-spacing: 4px;
		color: #6064DB;
		margin: 20px 0;
	}

	.login view {
		position: relative;
		display: flex;
		align-items: center;
		margin-top: 41rpx;
	}

	.login view input {
		width: 448rpx;
		height: 104rpx;
		background: #F8F8F8;
		border-radius: 52rpx;
		padding-left: 100px;
	}

	.login view image {
		position: absolute;
		left: 41rpx;
	}

	.login button {
		width: 605rpx;
		height: 91rpx;
		background: linear-gradient(-84deg, #7393f4, #6a7ee9);
		border-radius: 45rpx;
		font-size: 30rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 91rpx;
		text-align: center;
		letter-spacing: 10px;
		margin-top: 52rpx;
	}
</style>
